// Copyright (c) 2016 Chef Software Inc. and/or applicable contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

.hab-project {

  .lastBuild {
    color: $base-font-color;
    font-family: $base-font-family;
    font-weight: 400;
    margin-left: rem(40);
    text-transform: none;
  }

  .build-command {
    @include shadow-float;
    background-color: $hab-gray-dark;
    border-radius: $global-radius;
    color: $hab-off-white;
    font-family: $monospace-font-family;
    font-size: $monospace-font-size;
    padding: rem(10) rem(15);
    position: relative;
    white-space: nowrap;

    a {
      background-color: $hab-orange;
      border-radius: 0 $global-radius $global-radius 0;
      box-shadow: -3px 0 4px -2px $black;
      color: $hab-off-white;
      display: inline-block;
      font-size: rem(24);
      height: 100%;
      position: absolute;
      right: 0;
      text-align: center;
      top: 0;
      width: rem(40);
    }
  }

  .info, .builds {
    @include outer-container;

    .l {
      @include span-columns(8);
    }

    .r {
      @include span-columns(4);
      @include omega;

      border-left: 1px solid $hab-gray-light;
      padding-left: $base-spacing;

      li {
        margin-bottom: $base-spacing * 1.5;
      }
    }
  }

  .sourceUrl {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 200px;
  }

  .hab-build-list {
    margin-left: rem(-20);

    li {
      border-left: 4px solid;
      padding-left: $base-spacing;

      h1 {
        font-size: 100%;
      }

      .status {
        border-left: 4px solid $success-color;
        float: right;
        padding: rem(2) rem(10) rem(4);
      }

      &.queued {
        border-color: $queued-color;

        .color {
          color: $queued-color;
        }

        .status {
          border-color: $queued-color;
        }
      }

      &.failure {
        border-color: $failure-color;

        .color {
          color: $failure-color;
        }

        .status {
          border-color: $failure-color;
        }
      }

      &.success {
        border-color: $success-color;

        .color {
          color: $success-color;
        }
      }

      button.rebuild {
        font-size: 50%;
      }

      .output {
        font-family: $monospace-font-family;
        font-size: $monospace-font-size;
        @include pad($base-spacing);
        background: $hab-gray-dark;
        border-radius: $global-radius;
        color: $medium-gray;
        overflow: auto;
      }
    }
  }
}
